const path = require('path');
const fs = require('fs');
const API_SECRET = 'ZDdjMzhlMmYwNjcyMDNhZjg4NjMxZmM3'
const API_KEY = '3f16a1b8940bf02cff5d36b258fe27f8'
const APP_ID = '8490a25b'

function getURCSource() {
    return path.resolve(__dirname, '../../source/UCR_image/') + '/'
}

function getURCOutput() {
    return path.resolve(__dirname, '../../output/UCR_txt/') + '/'
}


function readOutPutSync() {
    const outputFiles = fs.readdirSync(getURCOutput())
    const filterOutputFiles = outputFiles.filter(file => file.indexOf('.txt') !== -1)
    return filterOutputFiles.map(file => getURCOutput() + file)
}

module.exports = {
    API_KEY,
    API_SECRET,
    APP_ID,
    getURCSource,
    getURCOutput,
    readOutPutSync
}